package com.tianji.learning.service;

import com.tianji.common.domain.dto.PageDTO;
import com.tianji.common.domain.query.PageQuery;
import com.tianji.learning.domain.dto.LearningPlanDTO;
import com.tianji.learning.domain.po.LearningLesson;
import com.baomidou.mybatisplus.extension.service.IService;
import com.tianji.learning.domain.vo.LearningLessonVO;
import com.tianji.learning.domain.vo.LearningPlanPageVO;

import java.util.List;

/**
 * <p>
 * 学生课程表 服务类
 * </p>
 *
 * @author liuchun
 * @since 2024-06-30
 */
public interface ILearningLessonService extends IService<LearningLesson> {
    /**
     * 添加课程到课表
     * @param userId
     * @param courseIds
     */
    void addUserLessons(Long userId, List<Long> courseIds);

    /**
     * 分页查询我的课表
     * @param pageQuery
     * @return
     */
    PageDTO<LearningLessonVO> queryLessons(PageQuery pageQuery);

    /**
     * 查询正在学习的课程
     * @return
     */
    LearningLessonVO queryMyCurrentLesson();

    /**
     * 检查课程是否有效
     * @param courseId
     * @return
     */
    Long checkValid(Long courseId);

    /**
     * 查询用户课表中指定课程状态
     * @param courseId
     * @return
     */
    LearningLessonVO queryLessonById(Long courseId);

    /**
     * 创建学习计划
     * @param learningPlanDTO
     */
    void createLearningPlans(LearningPlanDTO learningPlanDTO);

    /**
     * 查询学习计划进度
     * @param pageQuery
     * @return
     */
    LearningPlanPageVO queryLearningPlans(PageQuery pageQuery);
}
